package com.shopping.manager.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ccj.shopping_common.TreeNode;
import com.shopping.manager.service.ItemCatService;

@Controller
@RequestMapping("/item/cat")
public class ItemCatController {
	
	@Autowired
	private ItemCatService catService;

	@RequestMapping("/list/{parentId}")
	@ResponseBody
	public List<TreeNode> getItemCatList1(@PathVariable long parentId){
		
		return catService.getItemCatList(parentId);
	}
}
